@liberseek/boft-cli-win32-arm64 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/THIRD_PARTY_NOTICES.txt +6 -2
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +70 -20
- package/app/console-web.js +61 -18
- package/app/desktop-controller.mjs +1142 -69
- package/app/host-runtime.mjs +3804 -1949
- package/app/plugins/antigravity/plugin.mjs +77 -9
- package/app/plugins/claude-code/plugin.mjs +27 -6
- package/app/plugins/codebuddy/plugin.mjs +25 -0
- package/app/plugins/codex-usage/plugin.mjs +15 -0
- package/app/plugins/copilot/plugin.mjs +15 -0
- package/app/plugins/cursor-cli/plugin.mjs +43 -8
- package/app/plugins/deepseek-harness/plugin.mjs +472 -44
- package/app/plugins/devin/assets/icon.svg +1 -0
- package/app/plugins/devin/manifest.json +30 -0
- package/app/plugins/devin/plugin.mjs +23425 -0
- package/app/plugins/enabled.json +2 -0
- package/app/plugins/grok/plugin.mjs +470 -387
- package/app/plugins/hermes/plugin.mjs +468 -196
- package/app/plugins/kimi-code/plugin.mjs +65 -3
- package/app/plugins/kiro-cli/plugin.mjs +15 -0
- package/app/plugins/muse/plugin.mjs +15 -0
- package/app/plugins/omp/plugin.mjs +15 -0
- package/app/plugins/opencode/plugin.mjs +15 -0
- package/app/plugins/pi/plugin.mjs +1595 -411
- package/app/plugins/qoder/plugin.mjs +9539 -8654
- package/app/plugins/qoder-cn/plugin.mjs +9539 -8654
- package/app/plugins/qwen-code/assets/icon.svg +1 -0
- package/app/plugins/qwen-code/manifest.json +29 -0
- package/app/plugins/qwen-code/plugin.mjs +29366 -0
- package/app/plugins/workbuddy/plugin.mjs +25 -0
- package/app/plugins/zcode/plugin.mjs +157 -9
- package/app/renderer-extension.js +727 -274
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/licenses/Qwen-Code-SDK-LICENSE.txt +203 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ BOFT CLI runs Pi and other external harnesses inside Codex Desktop.
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g @liberseek/boft-cli@0.8.
|
|
10
|
+
npm install -g @liberseek/boft-cli@0.8.6
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Do not install this package directly. npm selects it through the optional dependencies of `@liberseek/boft-cli`.
|
|
@@ -36,7 +36,7 @@ The `boft` command launches the packaged Rust launcher with:
|
|
|
36
36
|
|
|
37
37
|
## Requirements
|
|
38
38
|
|
|
39
|
-
- Node.js 22 or
|
|
39
|
+
- Node.js 22.19.0 or later, except 23.x (other releases lack parts of the built-in `node:sqlite` module)
|
|
40
40
|
- Official ChatGPT/Codex Desktop for macOS, Windows, or Linux
|
|
41
41
|
- Pi on `PATH` when using the Pi agent
|
|
42
42
|
- Claude Code installed when using the Claude Code adapter
|
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -32,14 +32,18 @@ License text: licenses/OpenCode-v2-Client-LICENSE.txt
|
|
|
32
32
|
License: MIT
|
|
33
33
|
License text: licenses/OpenCode-SDK-LICENSE.txt
|
|
34
34
|
|
|
35
|
-
@qoder-ai/qoder-agent-sdk 1.0.
|
|
35
|
+
@qoder-ai/qoder-agent-sdk 1.0.58
|
|
36
36
|
License: SEE LICENSE IN LICENSE
|
|
37
37
|
License text: licenses/Qoder-Agent-SDK-LICENSE.txt
|
|
38
38
|
|
|
39
|
-
@qodercn-ai/qodercn-agent-sdk 1.0.
|
|
39
|
+
@qodercn-ai/qodercn-agent-sdk 1.0.58
|
|
40
40
|
License: SEE LICENSE IN LICENSE
|
|
41
41
|
License text: licenses/QoderCN-Agent-SDK-LICENSE.txt
|
|
42
42
|
|
|
43
|
+
@qwen-code/sdk 0.1.26
|
|
44
|
+
License: Apache-2.0
|
|
45
|
+
License text: licenses/Qwen-Code-SDK-LICENSE.txt
|
|
46
|
+
|
|
43
47
|
diff 8.0.2
|
|
44
48
|
License: BSD-3-Clause
|
|
45
49
|
License text: licenses/diff-LICENSE.txt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"version":"0.8.
|
|
1
|
+
{"schemaVersion":1,"version":"0.8.6","distribution":"npm","target":"windows-arm64"}
|
package/app/console-server.mjs
CHANGED
|
@@ -16490,6 +16490,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
16490
16490
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16491
16491
|
text: external_exports.string().optional()
|
|
16492
16492
|
}).strict();
|
|
16493
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
16494
|
+
kind: external_exports.literal("application"),
|
|
16495
|
+
value: external_exports.string().transform((text, context) => {
|
|
16496
|
+
try {
|
|
16497
|
+
return JSON.parse(text);
|
|
16498
|
+
} catch {
|
|
16499
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
16500
|
+
return external_exports.NEVER;
|
|
16501
|
+
}
|
|
16502
|
+
}).pipe(external_exports.object({
|
|
16503
|
+
expectedTurnId: hostTurnIdSchema,
|
|
16504
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
16505
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
16506
|
+
}).strict())
|
|
16507
|
+
}).strict().transform((context) => context.value);
|
|
16493
16508
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16494
16509
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16495
16510
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -17083,33 +17098,58 @@ var HarnessLaunchSettingsStore = class {
|
|
|
17083
17098
|
return path8.join(this.#directory, `${harnessPluginIdSchema.parse(id)}.json`);
|
|
17084
17099
|
}
|
|
17085
17100
|
async #read(id) {
|
|
17101
|
+
const file2 = this.#file(id);
|
|
17102
|
+
let text;
|
|
17086
17103
|
try {
|
|
17087
|
-
|
|
17088
|
-
if (!path8.isAbsolute(value))
|
|
17089
|
-
throw new Error("Expected an absolute entrypoint path");
|
|
17090
|
-
return value;
|
|
17104
|
+
text = await readFile4(file2, "utf8");
|
|
17091
17105
|
} catch (error51) {
|
|
17092
17106
|
if (error51 && typeof error51 === "object" && "code" in error51 && error51.code === "ENOENT")
|
|
17093
17107
|
return null;
|
|
17094
|
-
throw new Error(
|
|
17108
|
+
throw new Error(`Could not read Harness launch settings at ${file2}`, { cause: error51 });
|
|
17109
|
+
}
|
|
17110
|
+
let parsed;
|
|
17111
|
+
try {
|
|
17112
|
+
parsed = harnessLaunchPathSchema.parse(JSON.parse(text));
|
|
17113
|
+
} catch {
|
|
17114
|
+
}
|
|
17115
|
+
if (parsed === void 0 || !path8.isAbsolute(parsed)) {
|
|
17116
|
+
throw new Error(`Could not read Harness launch settings at ${file2}: expected an absolute installation path; save a new path or reset it`);
|
|
17095
17117
|
}
|
|
17118
|
+
return parsed;
|
|
17096
17119
|
}
|
|
17097
|
-
|
|
17098
|
-
async initialCommand(id) {
|
|
17120
|
+
#snapshot(id) {
|
|
17099
17121
|
let initial = this.#initial.get(id);
|
|
17100
17122
|
if (!initial) {
|
|
17101
|
-
initial = this.#read(id);
|
|
17123
|
+
initial = this.#read(id).then((value) => ({ path: value }), (error51) => ({ error: error51 instanceof Error ? error51 : new Error(String(error51)) }));
|
|
17102
17124
|
this.#initial.set(id, initial);
|
|
17103
17125
|
}
|
|
17104
|
-
return
|
|
17126
|
+
return initial;
|
|
17127
|
+
}
|
|
17128
|
+
/**
|
|
17129
|
+
* Capture the value used to construct this Host's Adapter; changes require a restart. A failed
|
|
17130
|
+
* read is remembered for restart reporting but not reused: the next call reads the file again.
|
|
17131
|
+
*/
|
|
17132
|
+
async initialCommand(id) {
|
|
17133
|
+
const cached2 = this.#initial.get(id);
|
|
17134
|
+
if (cached2 && "error" in await cached2)
|
|
17135
|
+
this.#initial.delete(id);
|
|
17136
|
+
const snapshot = await this.#snapshot(id);
|
|
17137
|
+
if ("error" in snapshot)
|
|
17138
|
+
throw snapshot.error;
|
|
17139
|
+
return snapshot.path ?? void 0;
|
|
17140
|
+
}
|
|
17141
|
+
/** The Adapter was built without a readable setting, so any saved value needs a restart. */
|
|
17142
|
+
#restartRequired(snapshot, value) {
|
|
17143
|
+
return "error" in snapshot || value !== snapshot.path;
|
|
17105
17144
|
}
|
|
17106
17145
|
async get(id) {
|
|
17107
|
-
const
|
|
17146
|
+
const snapshot = await this.#snapshot(id);
|
|
17108
17147
|
const value = await this.#read(id);
|
|
17109
|
-
return { path: value, restartRequired: value
|
|
17148
|
+
return { path: value, restartRequired: this.#restartRequired(snapshot, value) };
|
|
17110
17149
|
}
|
|
17150
|
+
/** Replaces the file without reading it, so an unreadable file can always be repaired. */
|
|
17111
17151
|
async set(id, value) {
|
|
17112
|
-
const
|
|
17152
|
+
const snapshot = await this.#snapshot(id);
|
|
17113
17153
|
const file2 = this.#file(id);
|
|
17114
17154
|
if (value === null) {
|
|
17115
17155
|
await rm3(file2, { force: true });
|
|
@@ -17130,7 +17170,7 @@ var HarnessLaunchSettingsStore = class {
|
|
|
17130
17170
|
await rm3(temporary, { force: true });
|
|
17131
17171
|
}
|
|
17132
17172
|
}
|
|
17133
|
-
return { path: value, restartRequired: value
|
|
17173
|
+
return { path: value, restartRequired: this.#restartRequired(snapshot, value) };
|
|
17134
17174
|
}
|
|
17135
17175
|
};
|
|
17136
17176
|
|
|
@@ -17191,10 +17231,15 @@ function createConsoleHarnesses(roots, environment = process.env) {
|
|
|
17191
17231
|
if (seen.has(manifest.id)) continue;
|
|
17192
17232
|
seen.add(manifest.id);
|
|
17193
17233
|
const icon = manifest.icon ? await readPluginIcon(plugin.root, manifest.icon).catch(() => null) : null;
|
|
17194
|
-
|
|
17195
|
-
|
|
17196
|
-
|
|
17197
|
-
|
|
17234
|
+
let launchPath = null;
|
|
17235
|
+
let launchPathError = null;
|
|
17236
|
+
if (manifest.launchCommand) {
|
|
17237
|
+
try {
|
|
17238
|
+
launchPath = (await store.get(manifest.id)).path;
|
|
17239
|
+
} catch (error51) {
|
|
17240
|
+
launchPathError = error51 instanceof Error ? error51.message : String(error51);
|
|
17241
|
+
}
|
|
17242
|
+
}
|
|
17198
17243
|
harnesses.push({
|
|
17199
17244
|
id: manifest.id,
|
|
17200
17245
|
name: manifest.name,
|
|
@@ -17203,7 +17248,8 @@ function createConsoleHarnesses(roots, environment = process.env) {
|
|
|
17203
17248
|
launchCommand: manifest.launchCommand === true,
|
|
17204
17249
|
links: manifest.links ?? null,
|
|
17205
17250
|
icon,
|
|
17206
|
-
launchPath
|
|
17251
|
+
launchPath,
|
|
17252
|
+
launchPathError
|
|
17207
17253
|
});
|
|
17208
17254
|
}
|
|
17209
17255
|
return harnesses.sort(
|
|
@@ -17220,7 +17266,7 @@ function createConsoleHarnesses(roots, environment = process.env) {
|
|
|
17220
17266
|
}
|
|
17221
17267
|
try {
|
|
17222
17268
|
const settings = await store.set(id, value);
|
|
17223
|
-
return { ...harness2, launchPath: settings.path };
|
|
17269
|
+
return { ...harness2, launchPath: settings.path, launchPathError: null };
|
|
17224
17270
|
} catch (error51) {
|
|
17225
17271
|
throw new ConsoleHarnessError(400, error51 instanceof Error ? error51.message : String(error51));
|
|
17226
17272
|
}
|
|
@@ -18102,7 +18148,11 @@ function startConsoleServer(options) {
|
|
|
18102
18148
|
return;
|
|
18103
18149
|
}
|
|
18104
18150
|
scheduleIdleExit();
|
|
18105
|
-
const url2 =
|
|
18151
|
+
const url2 = URL.parse(request.url ?? "/", `http://127.0.0.1:${port}`);
|
|
18152
|
+
if (!url2) {
|
|
18153
|
+
sendJson(response, 400, { error: "Bad Request" });
|
|
18154
|
+
return;
|
|
18155
|
+
}
|
|
18106
18156
|
const method = request.method ?? "GET";
|
|
18107
18157
|
const route = `${method} ${url2.pathname}`;
|
|
18108
18158
|
if (route === "GET /api/health") {
|
package/app/console-web.js
CHANGED
|
@@ -15706,6 +15706,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15706
15706
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15707
15707
|
text: external_exports.string().optional()
|
|
15708
15708
|
}).strict();
|
|
15709
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15710
|
+
kind: external_exports.literal("application"),
|
|
15711
|
+
value: external_exports.string().transform((text, context) => {
|
|
15712
|
+
try {
|
|
15713
|
+
return JSON.parse(text);
|
|
15714
|
+
} catch {
|
|
15715
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15716
|
+
return external_exports.NEVER;
|
|
15717
|
+
}
|
|
15718
|
+
}).pipe(external_exports.object({
|
|
15719
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15720
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15721
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15722
|
+
}).strict())
|
|
15723
|
+
}).strict().transform((context) => context.value);
|
|
15709
15724
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15710
15725
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15711
15726
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -18919,13 +18934,12 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
18919
18934
|
{ className: "console-harness__path" },
|
|
18920
18935
|
input,
|
|
18921
18936
|
button(document2, messages.save, () => submit(input.value.trim() || null)),
|
|
18922
|
-
harness2.launchPath ? button(document2, messages.useAutomatic, () => submit(null)) : null
|
|
18937
|
+
harness2.launchPath || harness2.launchPathError ? button(document2, messages.useAutomatic, () => submit(null)) : null
|
|
18923
18938
|
)
|
|
18924
18939
|
);
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
18928
|
-
);
|
|
18940
|
+
const message2 = status.get(harness2.id) ?? harness2.launchPathError;
|
|
18941
|
+
if (message2) {
|
|
18942
|
+
row.append(h(document2, "div", { className: "console-muted" }, message2));
|
|
18929
18943
|
}
|
|
18930
18944
|
}
|
|
18931
18945
|
if (guide) {
|
|
@@ -19533,7 +19547,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
19533
19547
|
};
|
|
19534
19548
|
function isUnsupportedMethod(error51, method) {
|
|
19535
19549
|
if (typeof error51 !== "object" || error51 === null) return false;
|
|
19536
|
-
const code = "code" in error51 ? error51.code : void 0;
|
|
19550
|
+
const code = "code" in error51 ? error51.code : "jsonRpcCode" in error51 ? error51.jsonRpcCode : void 0;
|
|
19537
19551
|
const message2 = "message" in error51 ? error51.message : void 0;
|
|
19538
19552
|
return code === -32601 || code === -32600 && typeof message2 === "string" && message2.startsWith(`Invalid request: unknown variant \`${method}\``);
|
|
19539
19553
|
}
|
|
@@ -21055,7 +21069,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21055
21069
|
launchPathAutomatic: "No saved override. Uses environment configuration, then automatic discovery.",
|
|
21056
21070
|
launchPathSaving: "Saving\u2026",
|
|
21057
21071
|
launchPathLoading: "Loading launch settings\u2026",
|
|
21058
|
-
launchPathLoadError: "Could not load launch settings.
|
|
21072
|
+
launchPathLoadError: "Could not load launch settings. Save an installation directory or reset to automatic discovery to replace them.",
|
|
21059
21073
|
launchPathSaveError: "Could not save. Enter an existing absolute installation folder on this Host and check configuration permissions.",
|
|
21060
21074
|
connectionOfficialWebsite: "Visit official website",
|
|
21061
21075
|
connectionOpenInstallation: "Open official installation page",
|
|
@@ -21370,7 +21384,7 @@ th[aria-sort] .console-usage-sort__mark {
|
|
|
21370
21384
|
launchPathAutomatic: "\u672A\u8BBE\u7F6E\u81EA\u5B9A\u4E49\u8DEF\u5F84\uFF0C\u4F7F\u7528\u73AF\u5883\u53D8\u91CF\u914D\u7F6E\u6216\u81EA\u52A8\u53D1\u73B0\u3002",
|
|
21371
21385
|
launchPathSaving: "\u6B63\u5728\u4FDD\u5B58\u2026",
|
|
21372
21386
|
launchPathLoading: "\u6B63\u5728\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\u2026",
|
|
21373
|
-
launchPathLoadError: "\u65E0\u6CD5\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\
|
|
21387
|
+
launchPathLoadError: "\u65E0\u6CD5\u8BFB\u53D6\u542F\u52A8\u8BBE\u7F6E\u3002\u4FDD\u5B58\u5B89\u88C5\u76EE\u5F55\u6216\u6062\u590D\u81EA\u52A8\u53D1\u73B0\u5373\u53EF\u66FF\u6362\u3002",
|
|
21374
21388
|
launchPathSaveError: "\u4FDD\u5B58\u5931\u8D25\u3002\u8BF7\u586B\u5199\u6B64 Host \u4E0A\u5B9E\u9645\u5B58\u5728\u7684\u5B89\u88C5\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5E76\u786E\u8BA4\u914D\u7F6E\u76EE\u5F55\u53EF\u5199\u3002",
|
|
21375
21389
|
connectionOfficialWebsite: "\u8BBF\u95EE\u5B98\u7F51",
|
|
21376
21390
|
connectionOpenInstallation: "\u524D\u5F80\u5B98\u65B9\u5B89\u88C5\u9875\u9762",
|
|
@@ -24037,7 +24051,7 @@ ${detail}` : ""}`
|
|
|
24037
24051
|
"codexhost was not detected over SSH. Install it on the remote computer or add it to the login shell PATH, then retry": "\u901A\u8FC7 SSH \u672A\u68C0\u6D4B\u5230 codexhost\u3002\u8BF7\u5728\u8FDC\u7A0B\u7535\u8111\u4E0A\u5B89\u88C5\uFF0C\u6216\u5C06\u5DF2\u5B89\u88C5\u7684 codexhost \u52A0\u5165\u767B\u5F55 shell \u7684 PATH \u540E\u91CD\u8BD5",
|
|
24038
24052
|
"The active codexhost does not match the global npm installation. Uninstall only the remote service, or remove the package manually on the remote computer": "\u5F53\u524D codexhost \u4E0E npm \u5168\u5C40\u5B89\u88C5\u4F4D\u7F6E\u4E0D\u5339\u914D\u3002\u8BF7\u9009\u62E9\u4EC5\u5378\u8F7D\u8FDC\u7A0B\u670D\u52A1\uFF0C\u6216\u5728\u8FDC\u7A0B\u7535\u8111\u4E0A\u624B\u52A8\u5378\u8F7D\u8F6F\u4EF6\u5305",
|
|
24039
24053
|
"The remote service was uninstalled, but removing the codexhost package failed. Check npm permissions on the remote computer and retry": "\u8FDC\u7A0B\u670D\u52A1\u5DF2\u5378\u8F7D\uFF0C\u4F46 codexhost \u8F6F\u4EF6\u5305\u5378\u8F7D\u5931\u8D25\u3002\u8BF7\u68C0\u67E5\u8FDC\u7A0B\u7535\u8111\u4E0A\u7684 npm \u6743\u9650\u540E\u91CD\u8BD5",
|
|
24040
|
-
"Remote Node.js is unsupported. Select Node.js 22.19 or later
|
|
24054
|
+
"Remote Node.js is unsupported. Select Node.js 22.19 or later, except 23.x": "\u8FDC\u7A0B Node.js \u7248\u672C\u4E0D\u53D7\u652F\u6301\uFF0C\u8BF7\u9009\u62E9 Node.js 22.19 \u53CA\u4EE5\u4E0A\u7248\u672C\uFF0C\u4F46\u4E0D\u5305\u62EC 23.x",
|
|
24041
24055
|
"npm installation failed. Check network access and global installation permissions": "npm \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u548C\u5168\u5C40\u5B89\u88C5\u6743\u9650",
|
|
24042
24056
|
"Remote service configuration failed. Check Codex CLI and the remote desktop login": "\u8FDC\u7A0B\u670D\u52A1\u914D\u7F6E\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5 Codex CLI \u4EE5\u53CA\u8FDC\u7A0B\u7535\u8111\u7684\u684C\u9762\u767B\u5F55\u72B6\u6001",
|
|
24043
24057
|
"Remote service could not stop. Check the remote service before retrying": "\u8FDC\u7A0B\u670D\u52A1\u65E0\u6CD5\u505C\u6B62\uFF0C\u8BF7\u68C0\u67E5\u8FDC\u7A0B\u670D\u52A1\u540E\u91CD\u8BD5",
|
|
@@ -25310,6 +25324,7 @@ ${detail}` : ""}`
|
|
|
25310
25324
|
loaded = true;
|
|
25311
25325
|
show(value);
|
|
25312
25326
|
}).catch(() => {
|
|
25327
|
+
loaded = true;
|
|
25313
25328
|
status.textContent = messages.launchPathLoadError;
|
|
25314
25329
|
}).finally(() => {
|
|
25315
25330
|
busy = false;
|
|
@@ -27137,6 +27152,30 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27137
27152
|
};
|
|
27138
27153
|
}
|
|
27139
27154
|
|
|
27155
|
+
// src/settings/session-import-sources.ts
|
|
27156
|
+
async function loadSessionImportSources(client, diagnostics, signal, refresh) {
|
|
27157
|
+
const { harnesses } = await client.listSessionImportSources();
|
|
27158
|
+
signal.throwIfAborted();
|
|
27159
|
+
if (!diagnostics || harnesses.length === 0) return harnesses;
|
|
27160
|
+
const hostId2 = client.hostId ?? "local";
|
|
27161
|
+
const readHost = () => diagnostics.snapshot().hosts.find((host2) => host2.hostId === hostId2);
|
|
27162
|
+
let host = readHost();
|
|
27163
|
+
const incomplete = () => !host || Boolean(host.directoryError) || harnesses.some(({ harnessId }) => {
|
|
27164
|
+
const status = host?.agents.find(({ agent }) => agent === harnessId)?.availability;
|
|
27165
|
+
return status === void 0 || status === "checking";
|
|
27166
|
+
});
|
|
27167
|
+
if (refresh || incomplete()) {
|
|
27168
|
+
await diagnostics.refresh(hostId2);
|
|
27169
|
+
signal.throwIfAborted();
|
|
27170
|
+
host = readHost();
|
|
27171
|
+
}
|
|
27172
|
+
if (incomplete()) throw new Error("Harness installation diagnostics are incomplete");
|
|
27173
|
+
const missing = new Set(
|
|
27174
|
+
host?.agents.filter(({ availability }) => availability === "notInstalled").map(({ agent }) => agent)
|
|
27175
|
+
);
|
|
27176
|
+
return harnesses.filter(({ harnessId }) => !missing.has(harnessId));
|
|
27177
|
+
}
|
|
27178
|
+
|
|
27140
27179
|
// src/settings/session-import-page.ts
|
|
27141
27180
|
function shortSessionId(value) {
|
|
27142
27181
|
return value.length <= 18 ? value : `${value.slice(0, 10)}\u2026${value.slice(-6)}`;
|
|
@@ -27214,7 +27253,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27214
27253
|
...getDiagnostics()?.snapshot().hosts.map(({ hostId: hostId2 }) => hostId2) ?? [],
|
|
27215
27254
|
...current ? [current] : []
|
|
27216
27255
|
])
|
|
27217
|
-
];
|
|
27256
|
+
].filter((hostId2) => hostId2 !== "durable");
|
|
27218
27257
|
displayedHostId = current;
|
|
27219
27258
|
const scrollLeft = hostOptions.scrollLeft;
|
|
27220
27259
|
hostOptions.replaceChildren();
|
|
@@ -27549,10 +27588,14 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27549
27588
|
content.append(list);
|
|
27550
27589
|
updateImportActions();
|
|
27551
27590
|
};
|
|
27552
|
-
const load = () => {
|
|
27591
|
+
const load = (refreshDiagnostics = false) => {
|
|
27553
27592
|
if (importingId !== null || context.signal.aborted) return;
|
|
27554
27593
|
loadedClient = null;
|
|
27555
|
-
|
|
27594
|
+
let client = getClient(selectedHostId);
|
|
27595
|
+
if (client?.hostId === "durable") {
|
|
27596
|
+
selectedHostId = "local";
|
|
27597
|
+
client = getClient(selectedHostId);
|
|
27598
|
+
}
|
|
27556
27599
|
renderHosts(client);
|
|
27557
27600
|
listControls.setBusy(client !== null);
|
|
27558
27601
|
refresh.disabled = client !== null;
|
|
@@ -27565,11 +27608,11 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27565
27608
|
void context.runLatest(
|
|
27566
27609
|
async (signal) => {
|
|
27567
27610
|
if (!client) throw new RendererSessionImportUnavailableError();
|
|
27568
|
-
const
|
|
27569
|
-
|
|
27570
|
-
|
|
27571
|
-
|
|
27572
|
-
|
|
27611
|
+
const harnesses = await loadSessionImportSources(
|
|
27612
|
+
client,
|
|
27613
|
+
getDiagnostics(),
|
|
27614
|
+
signal,
|
|
27615
|
+
refreshDiagnostics
|
|
27573
27616
|
);
|
|
27574
27617
|
const selected = harnesses.find(({ harnessId }) => harnessId === requestedHarness)?.harnessId ?? harnesses[0]?.harnessId ?? null;
|
|
27575
27618
|
if (signal.aborted) throw new Error("Session import selection changed");
|
|
@@ -27620,7 +27663,7 @@ ${messages.harnessVersionLatest}: ${harnessVersionLabel(version2.state, messages
|
|
|
27620
27663
|
load();
|
|
27621
27664
|
hostButtons.find((button2) => button2.dataset.sessionImportHost === hostId2)?.focus();
|
|
27622
27665
|
};
|
|
27623
|
-
refresh.addEventListener("click", load);
|
|
27666
|
+
refresh.addEventListener("click", () => load(true));
|
|
27624
27667
|
load();
|
|
27625
27668
|
return void 0;
|
|
27626
27669
|
}
|